﻿using Collection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace SandboxWriter
{
    class Program
    {
        static void Main(string[] args)
        {
            byte[] data = new byte[1024];
            //string data = "This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.This is the tribute to thalaiva.";
            using (RingBuffer buffer = new RingBuffer("spandan", 134217728))
            {
                buffer.InitializeMemory();
                for (int i = 0; i < 10000000; i++)
                {
                    //string data2 = i.ToString() + " " + data;
                    buffer.WriteData(data);
                    Console.WriteLine(i);
                    //Thread.Sleep(1000);
                }
                buffer.WriteDataEnd();
            }
            Console.WriteLine("Done");
            
            
        }
    }
}
